<?php if ($this->_var['full_page']): ?>
<?php echo $this->fetch('pageheader.htm'); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'../js/utils.js,listtable.js')); ?>
<!-- 商品搜索 -->
<div class="form-div">
  <form action="javascript:searchCircle()" name="searchForm" >
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    <?php echo $this->_var['lang']['circle_name']; ?> <input type="text" name="keywords" id="keywords" />
    <input type="submit" value="<?php echo $this->_var['lang']['button_search']; ?>" class="button" />
  </form>
</div>
<!-- 商品列表 -->
<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
  <!-- start goods list -->
  <div class="list-div" id="listDiv">
<?php endif; ?>
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      <!-- <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" /> -->
      <a href="javascript:listTable.sort('id'); "><?php echo $this->_var['lang']['record_id']; ?></a><?php echo $this->_var['sort_id']; ?>
    </th>
    <th><?php echo $this->_var['lang']['circle_name']; ?></th>
    <th><?php echo $this->_var['lang']['circle_order']; ?></th>
<!--     <th><a href="javascript:listTable.sort('sub_number'); "><?php echo $this->_var['lang']['sub_number']; ?></a><?php echo $this->_var['sort_sub_number']; ?></th>
    <th><a href="javascript:listTable.sort('view_times'); "><?php echo $this->_var['lang']['view_times']; ?></a><?php echo $this->_var['sort_view_times']; ?></th> -->
    <th><?php echo $this->_var['lang']['handler']; ?></th>
  <tr>
  <?php $_from = $this->_var['circle_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'circle');if (count($_from)):
    foreach ($_from AS $this->_var['circle']):
?>
  <tr>
    <td><!-- <input type="checkbox" name="checkboxes[]" value="<?php echo $this->_var['circle']['id']; ?>" /> --><?php echo $this->_var['circle']['id']; ?></td>
    <td class="first-cell"><span onclick="listTable.edit(this, 'edit_circle_name', <?php echo $this->_var['circle']['id']; ?>)"><?php echo $this->_var['circle']['circle_name']; ?></span></td>
    <td class="first-cell"><span onclick="listTable.edit(this, 'edit_circle_order', <?php echo $this->_var['circle']['id']; ?>)"><?php echo $this->_var['circle']['sort_order']; ?></span></td>
	<!-- <td align="right"><?php echo $this->_var['circle']['sub_number']; ?></td>
    <td align="right"><?php echo $this->_var['circle']['view_times']; ?></td> -->
    <td align="center">
      <a href="circle.php?act=edit&id=<?php echo $this->_var['circle']['id']; ?>" title="<?php echo $this->_var['lang']['edit']; ?>"><img src="images/icon_edit.gif" border="0" height="16" width="16" /></a>&nbsp;
     <a href="javascript:;" onclick="listTable.remove(<?php echo $this->_var['circle']['id']; ?>, '<?php echo $this->_var['lang']['drop_confirm']; ?>')" title="<?php echo $this->_var['lang']['remove']; ?>"><img src="images/icon_drop.gif" border="0" height="16" width="16"></a></span>
    </td>
  </tr>
  <?php endforeach; else: ?>
  <tr><td class="no-records" colspan="10"><?php echo $this->_var['lang']['no_records']; ?></td></tr>
  <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
<!-- end goods list -->
<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tr>
    <td align="right" nowrap="true">
    <?php echo $this->fetch('page.htm'); ?>
    </td>
  </tr>
</table>
<?php if ($this->_var['full_page']): ?>
</div>
</form>
<script>
	listTable.recordCount = <?php echo $this->_var['record_count']; ?>;
	listTable.pageCount = <?php echo $this->_var['page_count']; ?>;
	
	<?php $_from = $this->_var['filter']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
	listTable.filter.<?php echo $this->_var['key']; ?> = '<?php echo $this->_var['item']; ?>';
	<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
	console.info()
/* 搜索文章 */
 function searchCircle()
 {
    listTable.filter.keywords = Utils.trim(document.forms['searchForm'].elements['keywords'].value);
    listTable.filter.page = 1;
    listTable.loadList();
 }
</script>
<?php echo $this->fetch('pagefooter.htm'); ?>
<?php endif; ?>
